<?php

/**
 * JingYao-backend
 *
 * @link     https://gitee.com/wang-zhihui-release/jingyao-backend
 * @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateBannersTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('banners', function (Blueprint $table) {
            $table->id();
            $table->string('pic_url', 200)->comment('图片链接路径');
            $table->string('web_url', 255)->comment('web 页面跳转链接')->nullable();
            $table->string('xcx_url', 255)->comment('微信小程序跳转路由')->nullable();
            $table->string('title');
            $table->char('is_hide', 1)->default('N');
            $table->integer('push_time')->default(0);
            $table->tinyInteger('identity_visibility')->default(0)->comment('身份可见性');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('banners');
    }
}
